package org.dean.webapps.projectname.utils;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.InputStream;
import java.util.Properties;

public class PropertiesReader  {
    private Log log = LogFactory.getLog(this.getClass());

    public String get(String propPath, String propKey) {
        String value = null;
        InputStream in = this.getClass().getClassLoader().getResourceAsStream(propPath);
        Properties prop = new Properties();

        try {
            prop.load(in);
            value = prop.getProperty(propKey);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            value = "";
        } finally {

        }

        return value;
    }}